<template>
  <div class="head-menu">
    <el-row type="flex">
      <div class="logo">购物网</div>
      <div style="flex:1">
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          router
        >
          <el-menu-item index="/">文创</el-menu-item>
          <el-menu-item index="/clothes">服饰</el-menu-item>
          <el-menu-item index="/fresh">生鲜</el-menu-item>
          <el-menu-item index="/book">图书</el-menu-item>
        </el-menu>
      </div>

      <div class="shopcart">购物车</div>

      <div class="name">admin</div>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "/"
    };
  }
};
</script>

<style scoped>
.head-menu {
  background: #545c64;
  height: 60px;
}
.logo {
  width: 200px;
}
.logo,
.shopcart,
.name {
  color: #fff;
  cursor: pointer;
  line-height: 60px;
}
.shopcart {
  color: #9cf;
}
.name {
  width: 150px;
  font-size: 16px;
  text-align: center;
}
</style>